package com.nep.test;

import com.nep.entity.AqiFeedback;
import com.nep.io.FileIO;
import java.util.ArrayList;
import java.util.List;

public class InitAqiFeedbackData {
    public static void main(String[] args) {
        List<AqiFeedback> feedbackList = new ArrayList<>();
        
        // 创建第一条记录
        AqiFeedback feedback1 = new AqiFeedback();
        feedback1.setAfId(1);
        feedback1.setAfName("张三");
        feedback1.setDate("2024-03-20");
        feedback1.setEstimateGrade("轻度污染");
        feedback1.setProviceName("北京市");
        feedback1.setCityName("朝阳区");
        feedback1.setAddress("朝阳公园");
        feedback1.setInfomation("空气质量较差，有异味");
        feedback1.setGmName("陆家嘴");
        feedback1.setState("已指派");
        feedbackList.add(feedback1);
        
        // 创建第二条记录
        AqiFeedback feedback2 = new AqiFeedback();
        feedback2.setAfId(2);
        feedback2.setAfName("李四");
        feedback2.setDate("2024-03-21");
        feedback2.setEstimateGrade("优");
        feedback2.setProviceName("上海市");
        feedback2.setCityName("浦东新区");
        feedback2.setAddress("浦东新区");
        feedback2.setInfomation("空气清新，但有些灰尘");
        feedback2.setGmName("天河区");
        feedback2.setState("未指派");
        feedbackList.add(feedback2);
        
        // 创建第三条记录
        AqiFeedback feedback3 = new AqiFeedback();
        feedback3.setAfId(3);
        feedback3.setAfName("王五");
        feedback3.setDate("2024-03-22");
        feedback3.setEstimateGrade("良");
        feedback3.setProviceName("广东省");
        feedback3.setCityName("广州市");
        feedback3.setAddress("天河区");
        feedback3.setInfomation("空气质量一般");
        feedback3.setGmName("陆家嘴");
        feedback3.setState("未指派");
        feedbackList.add(feedback3);
        
        // 保存到文件
        FileIO.writeObject("aqifeedback.txt", feedbackList);
        System.out.println("数据初始化完成，共写入 " + feedbackList.size() + " 条记录");
    }
} 